DROP DATABASE [Studio7i_grupo2]
GO


CREATE DATABASE [Studio7i_grupo2]
GO

USE [Studio7i_grupo2]
GO

/****** Object:  Table [dbo].[Cliente]    Script Date: 09/24/2011 17:50:37 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Cliente](
	[codigo] [int] NOT NULL,
	[nombre] [varchar](30) NOT NULL,
	[dni] [varchar](8) NOT NULL,
	[clave] [varchar](12) NULL,
	[correo] [varchar](30) NULL,
	[fecnac] [varchar](10) NULL
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO






USE [Studio7i_grupo2]
GO

/****** Object:  Table [dbo].[DetalleReserva]    Script Date: 09/24/2011 17:50:49 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[DetalleReserva](
	[codigoReserva] [int] NULL,
	[codigoServicio] [int] NULL,
	[codigoInstrumento] [int] NULL,
	[costo] [decimal](10, 2) NULL
) ON [PRIMARY]

GO





USE [Studio7i_grupo2]
GO

/****** Object:  Table [dbo].[DetalleSala]    Script Date: 09/24/2011 17:51:00 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[DetalleSala](
	[codigoSala] [int] NULL,
	[tipoAsignacion] [int] NULL,
	[codigoSevicio] [int] NULL,
	[codigoInstrumento] [int] NULL
) ON [PRIMARY]

GO





USE [Studio7i_grupo2]
GO

/****** Object:  Table [dbo].[Instrumento]    Script Date: 09/24/2011 17:51:12 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Instrumento](
	[codigo] [int] NOT NULL,
	[tipo] [varchar](30) NULL,
	[modelo] [varchar](50) NULL,
	[marca] [varchar](50) NULL,
	[anofabri] [int] NULL,
	[caracteristicas] [varchar](100) NULL,
	[costohora] [decimal](15, 2) NULL
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO





USE [Studio7i_grupo2]
GO

/****** Object:  Table [dbo].[Local]    Script Date: 09/24/2011 17:51:21 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Local](
	[codigo] [int] NOT NULL,
	[nombre] [varchar](50) NULL,
	[direccion] [varchar](50) NULL
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO






USE [Studio7i_grupo2]
GO

/****** Object:  Table [dbo].[Reserva]    Script Date: 09/24/2011 17:51:31 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Reserva](
	[codigo] [int] NULL,
	[cliente] [int] NULL,
	[sala] [int] NULL,
	[dia] [varchar](10) NULL,
	[hora] [varchar](5) NULL,
	[costototal] [decimal](10, 2) NULL,
	[nHoras] [int] NULL
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO





USE [Studio7i_grupo2]
GO

/****** Object:  Table [dbo].[Sala]    Script Date: 09/24/2011 17:51:42 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Sala](
	[codigo] [int] NOT NULL,
	[nombre] [varchar](50) NOT NULL,
	[capacidad] [int] NULL,
	[caracteristicas] [varchar](100) NULL,
	[codlocal] [int] NULL,
	[costo] [decimal](10, 2) NULL
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO






USE [Studio7i_grupo2]
GO

/****** Object:  Table [dbo].[Servicio]    Script Date: 09/24/2011 17:51:53 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Servicio](
	[codigo] [int] NULL,
	[descripcion] [varchar](100) NULL,
	[costohora] [int] NULL
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


